|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.justobjects.pushlet.core.SessionManager
public class SessionManager
Manages lifecycle of Sessions.
| Field Summary |
|---|
| Method Summary | |
|---|---|
void |
addSession(Session session)
Add session. |
void |
apply(java.lang.Object visitor,
java.lang.reflect.Method method,
java.lang.Object[] args)
Visitor pattern implementation for Session iteration. |
Session |
createSession(Event anEvent)
Create new Session (but add later). |
static SessionManager |
getInstance()
Singleton pattern: get single instance. |
Session |
getSession(java.lang.String anId)
Get Session by session id. |
int |
getSessionCount()
Get number of listening Sessions. |
Session[] |
getSessions()
Get copy of listening Sessions. |
java.lang.String |
getStatus()
Get status info. |
boolean |
hasSession(java.lang.String anId)
Is Session present?. |
Session |
removeSession(Session aSession)
Register session for removal. |
void |
start()
Starts us. |
void |
stop()
Stopis us. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void apply(java.lang.Object visitor,
java.lang.reflect.Method method,
java.lang.Object[] args)
visitor - the object that should implement method parmmethod - the method to be called from visitorargs - arguments to be passed in visit method, args[0] will always be Session object
public Session createSession(Event anEvent)
throws PushletException
PushletExceptionpublic static SessionManager getInstance()
public Session getSession(java.lang.String anId)
public Session[] getSessions()
public int getSessionCount()
public java.lang.String getStatus()
public boolean hasSession(java.lang.String anId)
public void addSession(Session session)
public Session removeSession(Session aSession)
public void start()
throws PushletException
PushletExceptionpublic void stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||